package com.foreveross.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * PayCostFavorableInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "pay_cost_favorable_info", catalog = "hrtenement")
public class PayCostFavorableInfo implements java.io.Serializable {

	// Fields

	private String id;
	private OrderInfo orderInfo;
	private HouseUser houseUser;
	private HrHouses hrHouses;
	private Tenement tenement;
	private HrBusiness hrBusiness;
	private HrFavorable hrFavorable;
	private Integer count;
	private Double cost;
	private String outTradeNo;
	private Date chargeTime;
	private int payStatus;
	private int payType;

	// Constructors

	/** default constructor */
	public PayCostFavorableInfo() {
	}

	/** minimal constructor */
	public PayCostFavorableInfo(String id) {
		this.id = id;
	}

	/** full constructor */
	public PayCostFavorableInfo(String id, OrderInfo orderInfo, HouseUser houseUser,
			HrHouses hrHouses, Tenement tenement, HrBusiness hrBusiness,
			HrFavorable hrFavorable, Integer count, Double cost, String outTradeNo,
			Date chargeTime, int payStatus) {
		this.id = id;
		this.orderInfo = orderInfo;
		this.houseUser = houseUser;
		this.hrHouses = hrHouses;
		this.tenement = tenement;
		this.hrBusiness = hrBusiness;
		this.hrFavorable = hrFavorable;
		this.count = count;
		this.cost = cost;
		this.outTradeNo = outTradeNo;
		this.chargeTime = chargeTime;
		this.payStatus = payStatus;
	}

	// Property accessors
	@Id
	@GenericGenerator(name="idGenerator", strategy="uuid")
	@GeneratedValue(generator="idGenerator") 
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "order_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public OrderInfo getOrderInfo() {
		return this.orderInfo;
	}

	public void setOrderInfo(OrderInfo orderInfo) {
		this.orderInfo = orderInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public HouseUser getHouseUser() {
		return this.houseUser;
	}

	public void setHouseUser(HouseUser houseUser) {
		this.houseUser = houseUser;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "house_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public HrHouses getHrHouses() {
		return this.hrHouses;
	}

	public void setHrHouses(HrHouses hrHouses) {
		this.hrHouses = hrHouses;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tenement_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public Tenement getTenement() {
		return this.tenement;
	}

	public void setTenement(Tenement tenement) {
		this.tenement = tenement;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "business_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public HrBusiness getHrBusiness() {
		return this.hrBusiness;
	}

	public void setHrBusiness(HrBusiness hrBusiness) {
		this.hrBusiness = hrBusiness;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "favorable_id")
	@NotFound(action=NotFoundAction.IGNORE)
	public HrFavorable getHrFavorable() {
		return this.hrFavorable;
	}

	public void setHrFavorable(HrFavorable hrFavorable) {
		this.hrFavorable = hrFavorable;
	}

	@Column(name = "count")
	public Integer getCount() {
		return this.count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	@Column(name = "cost")
	public Double getCost() {
		return this.cost;
	}

	public void setCost(Double cost) {
		this.cost = cost;
	}

	@Column(name = "out_trade_no")
	public String getOutTradeNo() {
		return this.outTradeNo;
	}

	public void setOutTradeNo(String outTradeNo) {
		this.outTradeNo = outTradeNo;
	}

	@Column(name = "charge_time")
	public Date getChargeTime() {
		return this.chargeTime;
	}

	public void setChargeTime(Date chargeTime) {
		this.chargeTime = chargeTime;
	}

	@Column(name = "pay_status")
	public int getPayStatus() {
		return this.payStatus;
	}

	public void setPayStatus(int payStatus) {
		this.payStatus = payStatus;
	}
	
	@Column(name = "pay_type")
	public int getPayType() {
		return payType;
	}

	public void setPayType(int payType) {
		this.payType = payType;
	}
}